home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
btrieve
/
btrvpa.arc
/
BTRVPAGE.DOC
next >
Wrap
Text File
|
1989-07-16
|
5KB
|
117 lines
****************************************************************************
BTRIEVE Data Page Size Programs for Fixed Record Lengths
****************************************************************************
By: Charles Winser July 14, 1989
Computer: IBM PC and compatibles.
Development Environment: Turbo C and Microsoft Assembler
Contents of BTRVPAGE.ARC / BTRVPAGE.ZIP
1) BTRVPAGE.EXE - Version 1.0
Command line standard text output program.
Usage:
BTRVPAGE [Record Size] [Duplicate Keys]
Acceptable range of record length size: 4 - 4090 bytes
Acceptable range of duplicates keys: 0 - 24 keys
2) PAGEBTRV.EXE - Version 2.0
Program with color windows, error-checking,
context-sensitive help, and sound effects.
(Requires ANSI.SYS device driver)
Usage:
PAGEBTRV
3) BTRVPAGE.DOC - What you are reading now.
Included are two programs that calculate the optimum data page size
while working with standard Btrieve files and fixed record lengths.
The programs asks for the record length in bytes and the number of
keys that allow for duplicate values. The number of duplicate keys
is essential to determine the correct and actual size of the record
that is inserted into a Btrieve file. Each duplicate key requires
8 extra bytes to be store with each record in addition to the 6
bytes overhead required per data page. The programs select the best
data page size with the least number of unused bytes remaining. Each
data page size from 512 to 4096 bytes (in increments of 512 bytes)
is displayed with the total number of records, bytes remaining and
the percentage of the file that is utilized.
For your reference, the calculations used in these programs are:
actual record size =
(number of duplicate keys * 8) + record size
number of records =
(page size - 6) / actual record size
bytes remaining =
(page size - 6) - (actual record size * number of records)
percent used =
(((page size - 6) - bytes remaining) / (page size - 6)) * 100
The programs do not take into account that a larger data page size
with slighter more bytes remaining may make more efficient use of
disk space than a smaller page size with fewer bytes remaining. Also
if you are using the data compression feature found in Btrieve V5.00+,
there is no way to determine what the stored length of each record
will be. Use your own judgement and experience in selecting a correct
page size for a Btrieve file.
Please notify me, ideally through CompuServe's EasyPlex, if you find
any bugs or problems with these programs or if you have any suggestions
for improvement and enhancement. All three files have been date/time
stamped the same as a precaution to alteration by another party. Though
these programs have been carefully coded and tested to eliminate any
potential problems, I am reminded by a quote from the book ...
"The Zen of Programming" by Geoffrey James
'A program without bugs would be an absurdity, a nonesuch.
If there were a program without any bugs then the world
would cease to exist.'
Thus spoke the Master Lan-Hsi to the novice.
If you find BTRVPAGE or PAGEBTRV to be of use, a contribution of $10
would be greatly appreciated to defray the cost of Jolt Cola consumed
during development. However, a contribution is not necessary for you
to enjoy these programs.
Also, I would consider any job offers consulting in the following areas
in lieu of a contribution. All offers will be considered. Resume and
references upon request.
* Barcode Integrated Manufacturing Data Collection:
Inventory, SPC Quality Control, Time and Attendance.
System Planning, Development, Installation and Maintenance.
* Engineering, Environmental and General Office:
Databases and Support Programs.
* Bulletin Board Systems and Local/Wide Area Networks:
BBS On-Line Databases, Network Planning and Installation.
* Education and Technical Curriculum Development:
Public Schools and Corporate: Computer Related Topics, Biology,
and the Social Sciences.
Address:
Charles Winser
21402 Lee Drive, Cabin A
Los Gatos, CA, 95030
CompuServe: 73627,1456